#coding:utf-8
try:
    data = open("missing.txt")
    print(data.readline())
except IOError as err:  #吧错误的具体解释赋值给变量err
    print("File error" +str(err))
finally:
    if "data" in locals():  #看data在不在命名空间里面，如果在说明open（"missing.txt"）是执行成功了的
        data.close()